let fk=new Vue({
    el:'#filmsLike',
    data:{
        filmsLike:[]
    },
    created(){
        this.filmsLike=JSON.parse(localStorage.getItem("filmsLike"));
        localStorage.removeItem("filmsLike");

    },
    methods:{
        buy:function(id){
      
            localStorage.setItem("filmId",id);
            window.open("home_filmInfo.html");                            
        },
        commit:function(){
            let cond=$(".kw").val();
            
            if(cond==""){
                $(".kw").focus();
                layer.msg("请输入内容",{icon:6});
                return;
            }
        
            let formData={
                cond:cond
            }
            // 发送异步 ，实现影片的模糊查询
            $.get('http://localhost:8080/cinema/api/SelectFilmsByLikeServlet.do',formData,function(dto){
             
                fk.filmsLike=dto.value;
                
            });
        }
    }
});


